Adverse drug events are common during transitions from the hospital to the ambulatory setting, in part due to unintentional discrepancies in medication regimens and non-adherence with those regimes. The broad, long-term objectives of this research are to design, implement, and evaluate novel interventions to improve medication safety during transitions of care. The specific aims of the is study are to 1) Implement a smart pill-box intervention for patients discharged from the hospital to the community; 2) Evaluate the effects of the intervention on post-discharge medication discrepancies, medication adherence, and chronic disease management; and 3) Determine barriers and facilitators of implementation of the intervention. The design of this study is a cluster-randomized controlled trial, with clustering at the level of the primary care practice. Subjects will include randomly selected patients admitted to the medicine service of a large, urban hospital on 5 or more chronic medications and with a plan to be discharged to the community. The intervention will consist of a smart pill-box with pre-filled medication trays and several HIT features, including ability to send alerts to patients or caregivers by phone, email, or text if medication wells in the pillbox ae not accessed; and the generation of adherence reports accessible by patients, by caregivers (with patients' permission), and by providers by way of a link embedded within the electronic health record (EHR). Primary outcomes to be evaluated will include medication discrepancies between dispensed medications and the regimen documented in the EHR, and medication adherence based on prescription fill data, i.e., the proportion of days covered. Measures of disease control in patients with hypertension, hyperlipidemia, and diabetes mellitus will serve as secondary outcomes. We will also evaluate several measures of implementation of the intervention, such as the use of medication adherence reports by patients, caregivers, and providers. Multivariable regression with general estimating equations will be used to adjust for patient factors and account for clustering at the level of the primary care practice. Lastly, we wil conduct semi-structured qualitative interviews of a sample of patients, caregivers, and providers to learn more about the usability of the intervention and any barriers and facilitators of implementation. This study will advance the field of medication safety by quantifying the benefits of this type of intervention in the transitions setting, where it has not been previously evaluated and where there is demonstrable need for improvement.